package visiopuce.objets;

import java.util.Date;

public class Cotation {
	private Analyse analyse;

	private Date date;
	/**
	 * 
	 */

	private Integer idCotation;
	private Personne personne;
	private Prelevement prelevement;
	private TypeCotation typeCotation;

	private Date envoyer;

	public Analyse getAnalyse() {
		return analyse;
	}

	public Date getDate() {
		return date;
	}

	public Integer getIdCotation() {
		return idCotation;
	}

	public Personne getPersonne() {
		return personne;
	}

	public Prelevement getPrelevement() {
		return prelevement;
	}

	public TypeCotation getTypeCotation() {
		return typeCotation;
	}

	public void setAnalyse(Analyse analyse) {
		this.analyse = analyse;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public void setIdCotation(Integer idCotation) {
		this.idCotation = idCotation;
	}

	public void setPersonne(Personne personne) {
		this.personne = personne;
	}

	public void setPrelevement(Prelevement prelevement) {
		this.prelevement = prelevement;
	}

	public void setTypeCotation(TypeCotation typeCotation) {
		this.typeCotation = typeCotation;
	}

	@Override
	public String toString() {
		String chaine = "Cotation [idCotation=" + idCotation;
		if (analyse != null) {
			chaine += ", idAnalyse=" + analyse.getIdAnalyse();
		}
		if (personne != null) {
			chaine += ", idPersonne=" + personne.getIdPersonne();
		}
		if (prelevement != null) {
			chaine += ", idPrelevement=" + prelevement.getIdPrelevement();
		}
		if (envoyer != null) {
			chaine += ", envoyer=" + envoyer;
		} else {
			chaine += ", envoyer=non";
		}
		if (typeCotation != null) {
			chaine += ", idTypeCotation=" + typeCotation.getIdTypeCotation();
		}
		chaine += ", date=" + date + "]";
		return chaine;
	}

	public Date getEnvoyer() {
		return envoyer;
	}

	public void setEnvoyer(Date envoyer) {
		this.envoyer = envoyer;
	}

}
